<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
-->
<html>
<head>
	<title>FCKMenuBlock Test</title>
	<script type="text/javascript">
var FCK = new Object() ;	// Used by fckconfig

// Used by FCKPanel.
var FCKFocusManager = {
	Lock : function() {},
	Unlock : function() {}
} ;
	</script>
	<script src="../../../editor/_source/fckconstants.js" type="text/javascript"></script>
	<script src="../../../editor/_source/fckjscoreextensions.js" type="text/javascript"></script>
	<script src="../../../editor/_source/internals/fckbrowserinfo.js" type="text/javascript"></script>
	<script src="../../../editor/_source/internals/fcktools.js" type="text/javascript"></script>
	<script src="../../../editor/_source/internals/fckconfig.js" type="text/javascript"></script>
	<script src="../../../editor/lang/en.js" type="text/javascript"></script>
	<script src="../../../fckconfig.js" type="text/javascript"></script>
	<script src="../../../editor/_source/internals/fckdebug.js" type="text/javascript"></script>
	<script src="../../../editor/_source/classes/fckiecleanup.js" type="text/javascript"></script>
	<script src="../../../editor/_source/classes/fckicon.js" type="text/javascript"></script>
	<script src="../../../editor/_source/classes/fckpanel.js" type="text/javascript"></script>
	<script src="../../../editor/_source/classes/fckmenuitem.js" type="text/javascript"></script>
	<script src="../../../editor/_source/classes/fckmenublock.js" type="text/javascript"></script>
	<script src="../../../editor/_source/classes/fckmenublockpanel.js" type="text/javascript"></script>
	<script type="text/javascript">

FCKConfig.BasePath = '../../../editor/' ;

var FCK_IMAGES_PATH = '../../../editor/images/' ;		// Check usage.
var FCK_SPACER_PATH = '../../../editor/images/spacer.gif' ;

function LoadScript( url )
{
	document.write( '<script type="text/javascript" src="' + url + '"><\/script>' ) ;
}
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
LoadScript( '../../../editor/_source/internals/fcktools_' + sSuffix + '.js' ) ;

	</script>
	<script type="text/javascript">

if ( FCKBrowserInfo.IsIE )
	FCK.IECleanup = new FCKIECleanup( window ) ;

var FCK_IMAGES_PATH = '../../../editor/images/' ;		// Check usage.
var FCK_SPACER_PATH = '../../../editor/images/spacer.gif' ;

FCKConfig.SkinPath = '../../../editor/skins/default/' ;

// Includes the skin CSS in the main page.
document.write( '<link href="' + FCKConfig.SkinPath + 'fck_editor.css" type="text/css" rel="stylesheet">' ) ;

window.onload = function()
{
	CreateMenuBlock().Create( document.getElementById( '_TargetLTR' ) ) ;

	FCKLang.Dir = 'rtl' ;

	CreateMenuBlock().Create( document.getElementById( '_TargetRTL' ) ) ;
}

function CreateMenuBlock( dir )
{
	var oMenuBlock = new FCKMenuBlock( dir ) ;

	oMenuBlock.OnClick = MenuBlock_OnClick ;

	oMenuBlock.AddItem( 'Search'		, null, 2 ) ;
	oMenuBlock.AddSeparator() ;
	oMenuBlock.AddItem( 'Smiley'		, null, '../_common/smiley.gif' ) ;
	oMenuBlock.AddItem( 'No Icon' ) ;

	var oItem = oMenuBlock.AddItem( 'Move' ) ;
	oItem.AddItem( 'Next'		, null, [ '../_common/strip.gif', 16, 1 ] ) ;
	oItem.AddItem( 'Previous'	, null, [ '../_common/strip.gif', 16, 3 ] ) ;
	oItem.AddSeparator() ;

	var oItem2 = oItem.AddItem( 'Move Advanced' ) ;
	oItem2.AddItem( 'Next'		, null, [ '../_common/strip.gif', 16, 1 ] ) ;
	oItem2.AddItem( 'Previous'	, null, [ '../_common/strip.gif', 16, 3 ] ) ;

	oItem = oItem.AddItem( 'Move' ) ;
	oItem.AddItem( 'Next'		, null, [ '../_common/strip.gif', 16, 1 ] ) ;
	oItem.AddItem( 'Previous'	, null, [ '../_common/strip.gif', 16, 3 ] ) ;

	oItem = oItem.AddItem( 'More' ) ;
	oItem.AddItem( 'Next'		, null, [ '../_common/strip.gif', 16, 1 ] ) ;
	oItem.AddItem( 'Previous'	, null, [ '../_common/strip.gif', 16, 3 ] ) ;

	oMenuBlock.AddSeparator() ;
	oMenuBlock.AddItem( 'Checked_Item'	, 'Checked Item' ) ;
	oMenuBlock.AddItem( 'Next'			, null, 1	, true ) ;
	oMenuBlock.AddItem( 'Previous'		, null, [ '../_common/strip.gif', 16, 3 ] ) ;

	return oMenuBlock ;
}

function MenuBlock_OnClick( item )
{
	alert( item.Name ) ;
}

	</script>
</head>
<body>
	<table width="100%" height="100%">
		<tr>
			<td align="center">
				<table width="100%">
					<tr>
						<td id="_TargetLTR" align="center" width="50%">
						</td>
						<td id="_TargetRTL" align="center" width="50%" dir="rtl">
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>
